A typical client-server database system includes a client, a database server, and a database. The client portion includes two main components, a database application and a client driver interface. The database application issues database language commands (e.g., SQL (Structured Query Language) commands), and provides an interface to a user through a keyboard, screen, and/or pointing devices such as a mouse. The client driver interface provides the connection and communication interface between the client and the database server.
A specific connection between a particular client and a particular database server may be termed a database session. The database server responds to the database language commands (e.g., SQL queries) sent from the client by executing database operations for accessing and manipulating a physical database. Contained within the database server is session state data which may reflect the current state of the database session.
To initiate a database session, a “log on” procedure may be performed to establish a new database session by connecting a client with a database server. Normally, the database session lasts from the time the user connects until the time the user disconnects or exits the database application. However, if a database session failure occurs, either through a failure of the connection between the client and database, or the failure of the database or database server, the connection between the client and the database server is lost. When this occurs, the user will observe a visible interrupt in his service as access to the database is terminated. To continue accessing the database, the user must reconnect a client to an active database server. This may require human intervention to manually log back onto the system to establish a new database session.
Besides requiring human intervention to manually log back onto the system, the failure of a database session creates other significant problems to the user. Because the logon process creates a new database session, all previous queries that were not complete at the time of the failure are lost. Thus the user must resubmit all lost queries once the connection to the database is reestablished.
Based on the foregoing, it is desirable to provide a mechanism for handling the failure of a database session without requiring someone to perform manual reconnection steps. Additionally, it is also desirable to be able to restore session state data after the occurrence of a database session failure.